#!/usr/bin/env bash

## configure and install minimal openbox desktop environment

## check for sudo/root
if ! [ $(id -u) = 0 ]; then
  echo "This script must run with sudo, try again..."
  exit 1
fi

sudo apt update

    sudo apt install --no-install-recommends \
    xorg \
    mesa-vulkan-drivers \
    xfonts-cyrillic \
    mesa-utils 

sudo apt-get purge xfce4-panel xfdesktop4 xfwm4 xfce4-appfinder ristretto cinnabar-icon-theme
sudo apt-get autopurge

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openbox

sudo apt-get install --no-install-recommends \
	network-manager 
echo
mkdir -p /home/admin/.config/openbox
cp /etc/xdg/openbox/* /home/admin/.config/openbox/
cd ..
ls -a .config/openbox/
echo openbox install complete, please reboot and issue 'startx'
echo
